#pragma once
#include <QObject>
#include "QMsgManager.h"


class QTcpSocket;
class QString;
class QObject;
class LoginAction;
class ActionBase;
class GetUserListAction;
class UserInfo;
class UserMessageAction;


class QServerMsgManager : public QMsgManager
{
    Q_OBJECT
public:
    QServerMsgManager();
    ~QServerMsgManager();

    static QServerMsgManager& GetInstance();

protected:
    void OnProcessAction(QTcpSocket* pSock, QString const& actionString) override;

    bool CheckToken(std::shared_ptr<LoginAction> pAction);
    void ProcessGetUserInfoList(std::shared_ptr<GetUserListAction> pAction);
    void ProcessUserMessage(std::shared_ptr<UserMessageAction> pAction);
};

